/**
  ******************************************************************************
  * @file    bsp_gprs.h
  * @author  Iron
  * @date    2018-08-07
  * @version v1.0
  * @brief   bsp gprs header file
  */

#ifndef __BSP_GPRS_H
#define __BSP_GPRS_H

#ifdef __cplusplus
extern "C" {
#endif

/* includes -------------------------------------------------------------------*/
#include <stdint.h>
#include "bsp_usart_ex.h"

/* exported types ------------------------------------------------------------*/
/* exported constants --------------------------------------------------------*/
/* exported macro ------------------------------------------------------------*/
/* exported functions ------------------------------------------------------- */

// gpio
void gprs_gpio_init(void);
void gprs_power_on(void);
void gprs_power_off(void);
void gprs_pwrkey_pulse(void);
uint32_t gprs_get_power_status(void);

// uart
int gprs_uart_init(usart_ex_isr_rx_indicate_t rx_indicate);
int32_t gprs_uart_send(uint8_t *data, int32_t len, uint32_t timeout);
int32_t gprs_uart_getbyte(uint8_t *data, uint32_t timeout);
int32_t gprs_uart_recv(uint8_t *data, int32_t size, uint32_t timeout);

/**
  * @}
  */

#ifdef __cplusplus
}
#endif

#endif /* __BSP_GPRS_H */

/******************* (C)COPYRIGHT 2018 *****END OF FILE***********************/
